﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class PresupFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As PresupBE
        Dim tmpPresup As PresupBE = New PresupBE()
        Try
            With tmpPresup
                .Anio = convertDTFromDb.convertInt32(dr.Item("Anio"))
                .Comprometido = convertDTFromDb.convertDouble(dr.Item("Comprometido"))
                .Gastado = convertDTFromDb.convertDouble(dr.Item("Gastado"))
                .Mes = convertDTFromDb.ConvertString(dr.Item("Mes"))
                .NumCuenta = convertDTFromDb.ConvertString(dr.Item("NumCuenta"))
                .Presupuesto = convertDTFromDb.convertDouble(dr.Item("Presupuesto"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
            End With
            Return tmpPresup
        Catch ex As Exception
            Throw
        Finally
            tmpPresup = Nothing
        End Try
    End Function
End Class
